package design.pattern.Command.main;

import design.pattern.Command.factory.CommandFactory;
import design.pattern.Command.inter.CommandHandle;
import design.pattern.Command.inter.impl.CommandImplA;
import design.pattern.Command.inter.impl.CommandImplB;

public class MainTest {
  public static void main(String[] args) {
    CommandFactory.register("undo", new CommandImplA());
    CommandFactory.register("undo", new CommandImplB());
    
    CommandFactory.get("undo").forEach(CommandHandle::execute);
  }
}
